import { IParam, IContext, DataServiceBase, IHttpResponse } from '@/core';
import { AvueChildOneDTOHelp,  } from '../dto-help/avue-child-one-helps';
import { AvueChildOne } from '../avue-child-one';
import AvueChildOneKeys from '../avue-child-one-keys';


/**
 * avue示例实体01服务对象基类
 * 基于template/src/api/{{appEntities}}/data-service/{{appEntities}}-service-base.ts.hbs生成
 *
 * @export
 * @class AvueChildOne
 * @extends {EntityBaseService}
 */
export class AvueChildOneServiceBase extends DataServiceBase<AvueChildOne> {

	/**
	 * 存储模式
	 *
	 * @type {(0 | 1 | 3 | 4)} 无本地存储 | 仅本地存储 | 本地及远程存储 | DTO无存储
	 * @memberof AvueChildOneServiceBase
   */
	readonly storageMode: number = 4;

	/**
	 * Creates an instance of AvueChildOneServiceBase.
	 *
	 * @param {*} [opts={}]
	 * @memberof AvueChildOneServiceBase
	 */
	constructor(opts: IParam = {}) {
		super(opts, 'AvueChildOne');
	}

	/**
	 * 初始化基础数据
	 *
	 * @protected
	 * @memberof AvueChildOneServiceBase
	 */
  protected initBasicData() {
		this.systemName = 'demosys';
		this.appName = 'web';
		this.appEntityName = 'avuechildone';
		this.appEntityCodeName = 'avuechildone';
		this.appEntityCodeNames = 'avuechildones';
    	this.appEntityKeyCodeName = 'avuechildoneid';
      	this.appEntityTextCodeName = 'avuechildonename';
  	}

	/**
	 * 构造实体
	 *
	 * @protected
	 * @param {IParam} data
	 * @param {IContext} [context]
	 * @return {*} { AvueChildOne }
	 * @memberof AvueChildOneServiceBase
	 */
	protected newEntity(data: IParam, context: IContext = {}): AvueChildOne {
    return new AvueChildOne(data);
  }

	/**
	 * 过滤当前实体服务，标准接口数据
	 *
	 * @return {*}  {*}
	 * @memberof AvueChildOneServiceBase
	 */
	protected filterEntityData(entity: AvueChildOne): any {
		const data: any = {};
		AvueChildOneKeys.forEach(key => {
				if (entity[key] !== void 0) {
						data[key] = entity[key];
				}
		});
		return data;
	}
















}